package pl.smath.expression.model.presentation;

public enum IntervalClosureType {
	OPEN, CLOSED, OPEN_CLOSED, CLOSED_OPEN;
	
	public static IntervalClosureType fromString(String s){
		IntervalClosureType ict = OPEN;
		
		if (s.toLowerCase().equals("closed"))
			ict = CLOSED;
		else if (s.toLowerCase().equals("open-closed"))
			ict = OPEN_CLOSED;
		else if (s.toLowerCase().equals("closed-open"))
			ict = CLOSED_OPEN;
		
		return ict;
	}
}
